package com.demo.controller;

import com.demo.service.BugStatisticService;
import com.demo.vo.BugStatistic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
public class BugStatisticController {

    @Autowired
    private BugStatisticService bugStatisticService;

    @RequestMapping({"bugStatistic"})
    @ResponseBody
    public List<BugStatistic> countByColumn(@RequestParam("columnName") String columnName){
        List<BugStatistic> list = bugStatisticService.countByColumn(columnName);
        return list;
    }
}
